# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-apispec-webframeworks
pkgver=0.5.2
pkgrel=6
pkgdesc="Web framework plugins for apispec"
url="https://github.com/marshmallow-code/apispec-webframeworks"
license=('MIT')
arch=('any')
depends=('python-apispec' 'python-yaml')
makedepends=('python-setuptools')
checkdepends=('python-pytest-runner' 'python-bottle' 'python-flask' 'python-tornado')
source=("$pkgname-$pkgver.tar.gz::https://github.com/marshmallow-code/apispec-webframeworks/archive/$pkgver.tar.gz")
sha512sums=('56e39f69da7909d6db81c331dc00cb16414832c9393c272d1b1329282ff2e49f36fee51e3e131bf2586d0c2960c08cd4ba5f04f2d984a2d6a73a17942268f2e6')

build() {
  cd apispec-webframeworks-$pkgver
  python setup.py build
}

check() {
  cd apispec-webframeworks-$pkgver
  python setup.py pytest || echo "https://github.com/marshmallow-code/apispec-webframeworks/issues/45"
}

package() {
  cd apispec-webframeworks-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
